package com.wxproject.demo.Common.exception;

/**
 * @author zqf
 * @date 2021/3/31 23:14
 * @description
 */
public enum ResultEnum {
        UNKNOWN_ERROR(-100, "未知错误"),
        NEED_LOGIN(-1, "未登录"),
        REPEAT_REGISTER(-2, "该用户已注册"),
        USER_NOT_EXIST(-3, "不存在该用户"),
        PASSWORD_ERROR(-4, "密码错误"),
        EMPTY_USERNAME(-5, "用户名为空"),
        EMPTY_PASSWORD(-6, "密码为空"),
        SUCCESS(0, "success"),
        WRONG_PARAM(-12,"输入格式有误"),
        EXIST_ARTICLE_TYPE(-15,"该类型已存在"),
        EMPTY_CHAT_ROOM(-7,"聊天室为空"),
        EMPTY_ACTIVE_CODE(-10,"激活链接已失效"),
        TOKEN_VERIFY_FAIL(-8,"Token认证失败"),
        USER_ALREADY_BAN(-9,"用户已被封禁"),
        NOT_VALID(-10,"非活体");

        private Integer code;

        private String msg;

        private ResultEnum(Integer code, String msg) {

            this.code = code;
            this.msg = msg;
        }

        public Integer getCode() {

            return code;
        }

        public String getMsg() {

            return msg;
        }
    }

